package com.gopay.common.cps.dao.order;

import java.io.Serializable;
import java.math.BigDecimal;

import com.gopay.common.base.dao.BaseDAO;
import com.gopay.common.base.dao.BaseReadDAO;
import com.gopay.common.domain.cps.CpsGenReceiptOrder;

/**
 * 收款订单查询DAO
 * 
 * @CpsGeneralReceiptOrderQueryDAO.java
 * @author MA HUAN
 * @2013-1-9 上午10:53:39 www.gopay.com.cn Inc.All rights reserved.
 */
public interface CpsGeneralReceiptOrderQueryDAO extends BaseReadDAO<CpsGenReceiptOrder, Serializable> {
    /**
     * 获取累计成功退款金额
     * 
     * @param gopayOrderId
     * @return
     */
    public BigDecimal findTotal02RefundAmt(String gopayOrderId);
    
    /**
     * 获取累计成功退还手续费金额
     * 
     * @param gopayOrderId
     * @return
     */
    public BigDecimal findTotal02RefundFeeAmt(String gopayOrderId);
    
    /**
     * 获取退款已用额度(包含进行中和成功的订单),用来校验退款额度是否超限
     * @param gopayOrderId
     * @return
     */
    public BigDecimal findTotal02RefundUsedLimit(String gopayOrderId);

    /**
     * 判断是否为分账订单
     * @param gopayOrderId
     * @return
     */
    Boolean isSpiltOrder(String gopayOrderId);

    CpsGenReceiptOrder findByGopayOrderId(String gopayOrderId);

}
